<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我是title</title>
</head>
<body>
    <input type="text" name="user">
    <script>
        {
            let bodyEle = document.querySelector("body");
            let res = document.body;
            console.log(bodyEle);
            console.log(res);
        }
        {
            let htmlEle = document.querySelector("html");
            let res = document.documentElement;
            console.log(htmlEle);
            console.log(res);
        }
        {
            let headEle = document.querySelector("head");
            let res = document.head;
            console.log(headEle);
            console.log(res);
        }
        {
            let titleEle = document.querySelector("title");
            let res = document.title;
            console.log(titleEle);
            console.log(res);
        }
        {
            let inputEle = document.getElementsByName("name");
            console.log(inputEle);
        }
    </script>
</body>
</html>